package stock

import (
	"gitee.com/lyuanbo/stock-plus/internal/svc"
	storagememory "gitee.com/lyuanbo/stock-plus/pkg/stock/storage_memory"
	"gitee.com/lyuanbo/stock-plus/pkg/worker_manager"
)

var _ workermanager.Tasker = (*MACDWorker)(nil)

func init() {
	workermanager.Register(func(svcCtx *svc.ServiceContext, cache *storagememory.Cache) workermanager.Tasker {
		return NewMACDWorker(svcCtx, cache)
	})
}

func NewMACDWorker(svcCtx *svc.ServiceContext, cache *storagememory.Cache) *MACDWorker {
	return &MACDWorker{
		svcCtx: svcCtx,
		cache:  cache,
	}
}

type MACDWorker struct {
	svcCtx *svc.ServiceContext
	cache  *storagememory.Cache
}

func (m *MACDWorker) Name() string {
	return "macd"
}

func (m *MACDWorker) Init() {

}

func (m *MACDWorker) Start() {
	go m.Run()
}

func (m *MACDWorker) Run() {

}
